package com.example.crm.service.impl;

import com.example.crm.dao.IUserDAO;
import com.example.crm.dao.impl.UserDAOImpl;
import com.example.crm.service.IUserService;

import java.sql.SQLException;

/**
 * @author lazyfier
 * @date 2022/3/8.18:31
 */

public class UserServicelmpl implements IUserService {
    @Override
    public boolean login(String username, String password){
        // 调用DAO层查询
        IUserDAO userDAO = new UserDAOImpl();
        try {
            boolean result = userDAO.findByUernamePassword(username, password);
             return result;
        } catch (SQLException e) {
            e.printStackTrace();
        }
        return false;
    }
}
